{extend name="base/common"/}

{block name="slider"}
      <div class="banner" id="b06">
          <ul>
              <li><img class="sliderimg" src="__IMG__/unslider/springrain.jpg" width="100%"></li>
              <li><img class="sliderimg" src="__IMG__/unslider/womenflower.jpg" width="100%"></li>
              <li><img class="sliderimg" src="__IMG__/unslider/face.jpg" width="100%"></li>
              <li><img class="sliderimg" src="__IMG__/unslider/car.jpg" width="100%"></li>
          </ul>
          <a href="javascript:void(0);" class="unslider-arrow06 prev"><img class="arrow" id="al" src="__IMG__/unslider/arrowl.png" alt="prev" width="20" height="35"></a>
          <a href="javascript:void(0);" class="unslider-arrow06 next"><img class="arrow" id="ar" src="__IMG__/unslider/arrowr.png" alt="next" width="20" height="35"></a>
      </div>
{/block}
{block name="side"}
<!-- 左侧 nav
================================================== -->
    <div class="span3 bs-docs-sidebar">
        <ul class="nav nav-list bs-docs-sidenav">
           {:widget('Category/lists', array(1, true))}
        </ul>
    </div>
{/block}
{block name="body"}

    <div class="span9">
        <!-- Contents
        ================================================== -->
        <section id="contents">

            {article:list name="article" category="1" child="true"}
                <div class="row">
                    <div class="span2 pull-left">
                      <a href="{:url('Article/detail?id='.$article['id'])}">
                        <img class="img-responsive" src="__ROOT__{$article.cover_id|get_cover_path}" />
                      </a>
                    </div>
                    <div class="span7">
                      <h3><a href="{:url('Article/detail?id='.$article['id'])}">{$article.title}</a></h3>
                      <p class="lead">{$article.description}</p>
                      <span><a href="{:url('Article/detail?id='.$article['id'])}">查看全文</a></span>
                      <span class="pull-right">
                          <span class="author">{$article.uid|get_username}</span>
                          <span>于 {$article.create_time|date='Y-m-d H:i',###}</span> 发表在 <span>
                          <a href="{:url('Article/lists?category='.get_category_name($article['category_id']))}">{$article.category_id|get_category_title}</a></span> ( 阅读：{$article.view} )
                      </span>
                    </div>
                </div>
                <hr/>
            {/article:list}

        </section>
    </div>
{/block}

{block name="script"}
    <script type="text/javascript">
        //图片轮播
        function imgReload()
        {
          var imgHeight = 0;
          var wtmp = $("body").width();
          $("#b06 ul li").each(function(){
                $(this).css({width:wtmp + "px"});
            });
          $(".sliderimg").each(function(){
            $(this).css({width:wtmp + "px"});
            imgHeight = $(this).height();
          });
        }
        $(window).resize(function(){imgReload();});
        $(document).ready(function(e) {
          imgReload();
            var unslider06 = $('#b06').unslider({
            dots: true,
            fluid: true
          }),
          data06 = unslider06.data('unslider');
          $('.unslider-arrow06').click(function() {
                var fn = this.className.split(' ')[1];
                data06[fn]();
            });
        });
    </script>
{/block}
